package business.impls.xml;

import org.xml.sax.XMLReader;
import org.xml.sax.SAXException;

import java.io.IOException;
import java.util.HashMap;

/**
 * User: Programmer
 * Date: 12.04.2006
 * Time: 14:21:15
 */
public class XML_MainConfig {
    private Class c = null;
    private XML_MainConfig_Parser sax = null;
    public void prepare(String path) throws ClassNotFoundException, IllegalAccessException, InstantiationException, IOException, SAXException{
        c = Class.forName("org.apache.xerces.parsers.SAXParser");
        XMLReader reader = (XMLReader)c.newInstance();
        sax = new XML_MainConfig_Parser();
        reader.setContentHandler(sax);
        reader.parse(path);
    }

    public boolean isAdditionalEnabled() {
        return sax.isAdditionalEnabled();
    }

    public String getFieldNameProfO() {
        return sax.getFieldNameProfO();
    }

    public String getFieldNameProfM() {
        return sax.getFieldNameProfM();
    }

    public String getReportPath() {
        return sax.getReportPath();
    }

    public String getDepartmentName() {
        return sax.getDepartmentName();
    }

}
